package com.icehand.learn.graphql.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@TableName("author")
public class Author extends Model<Author> {
	@TableId(value = "id",type = IdType.AUTO)
	private Long id;
	private String firstName;
	private String lastName;
	private Date createTime;

	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}
